package com.alibaba.citrus.ots.forecast.repository;

import com.epoch.app.otsforecastsales.domian.forecastorderline.dto.UpdateCollectStatusRequest;
import com.epoch.app.otsforecastsales.dto.request.DeleteForecastLineDetailRequest;
import com.epoch.app.otsforecastsales.dto.request.LoseFocusSaveForecastLineOrderRequest;
import com.epoch.app.otsforecastsales.sdo.ForecastOrderLineSDO;

import java.util.List;

public interface ForecastOrderLineWriteRepository {
    String save(ForecastOrderLineSDO forecastOrderLineSDO);

    Integer modify(ForecastOrderLineSDO forecastOrderLineSDO);

    /**
     * 提交预报单子单
     * @param forecastOrderLineSDO
     * @return
     */
    Boolean submit(ForecastOrderLineSDO forecastOrderLineSDO);
    /**
     * 通用update
     * @param forecastOrderLineSDO
     * @return
     */
    Boolean update(ForecastOrderLineSDO forecastOrderLineSDO);
    /**
     * 修改预报单预计回复数量
     * @param forecastOrderLineSDO
     * @return
     */
    Boolean updateReplyQuantity(ForecastOrderLineSDO forecastOrderLineSDO);




    /**
     * 批量修改预报订单状态
     * @param batchAnalysisOrdersRequest
     * @return
     */
    Boolean batchUpdateStatus(List<ForecastOrderLineSDO> batchAnalysisOrdersRequest);

    Integer loseFocusSave(LoseFocusSaveForecastLineOrderRequest request);

    Integer deleteForecastLine(DeleteForecastLineDetailRequest request);
    /**
     * 批量修改预报订单
     *
     * @param forecastOrderLineSDOList
     * @return
     */
    Boolean batchUpdateForecastOrderLine(List<ForecastOrderLineSDO> forecastOrderLineSDOList);

    /**
     * 分析过程中使用的更新方法，与update重复，由于使用的地方较多未进行替换，将方法名由analysis修改为updateForAnalysis
     * @param forecastOrderLineSDO
     * @return
     */
    Boolean updateForAnalysis(ForecastOrderLineSDO forecastOrderLineSDO);

    Boolean batchUpdateCollectStatus(UpdateCollectStatusRequest request);

}
